﻿using System;
using System.Collections.Generic;

namespace SilenthinkContract.Domain
{
    public class RechargePackage : BaseEntity<int>
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 副标题
        /// </summary>
        public string SubTitle { get; set; }

        /// <summary>
        /// 充值类型
        /// </summary>
        public int Category { get; set; }

        /// <summary>
        /// 套餐金额
        /// </summary>
        public decimal OriginalAmount { get; set; }

        /// <summary>
        /// 原始金额
        /// </summary>
        public decimal PackageAmount { get; set; }

        /// <summary>
        /// 赠送金额
        /// </summary>
        public decimal DonationAmount { get; set; }

        /// <summary>
        /// 赠送积分
        /// </summary>
        public int DonationIntegral { get; set; }

        /// <summary>
        /// 赠送拍币
        /// </summary>
        public int DonationBidAmount { get; set; }

        /// <summary>
        /// 礼包图片
        /// </summary>
        public string PackageImg { get; set; }

        /// <summary>
        /// 图标类名
        /// </summary>
        public string PackageIcon { get; set; }

        /// <summary>
        /// 礼包描述
        /// </summary>
        public string PackageDesc { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? BeginDate { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// 充值礼包次数限制
        /// </summary>
        public PackageLimitation Limitation { get; set; }

        /// <summary>
        /// 充值礼包次数限制(选择折扣限制为NTimesOnly或NTimesPerCustomer时使用)
        /// </summary>
        public int LimitationTimes { get; set; }

        /// <summary>
        /// 使用次数
        /// </summary>
        public int UsedCount { get; set; }

        public string PackageIds { get; set; }

        /// <summary>
        /// 扩展信息
        /// </summary>
        public string Extra { get; set; }

        /// <summary>
        /// 状态 False不可用 True可用
        /// </summary>
        public bool Status { get; set; }

        public virtual IList<RechargePackageRequirement> Requirements { get; set; }

    }
    /// <summary>
    /// 充值礼包次数限制
    /// </summary>
    public enum PackageLimitation : byte
    {
        /// <summary>
        /// 无限制
        /// </summary>
        Unlimited = 0,
        /// <summary>
        /// 只能使用N次
        /// </summary>
        NTimesOnly = 1,
        /// <summary>
        /// 每个用户只能使用N次
        /// </summary>
        NTimesPerCustomer = 2,
    }
}